package com.bd.scm.domain.models.leave;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 请假单   
 * </p>
 *
 * @author Mason
 * @since 2019-12-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("bd_leave_order")
public class BdLeaveOrder extends Model<BdLeaveOrder> {

    private static final long serialVersionUID = 1L;

    /**
     * 表ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 请假单ID
     */
    @TableField("order_id")
    private String orderId;
    /**
     * 请假类型ID
     */
    @TableField("leave_id")
    private String leaveId;
    /**
     * 开始日期
     */
    @TableField("start_date")
    private Date startDate;
    /**
     * 结束日期
     */
    @TableField("end_date")
    private Date endDate;
    /**
     * 提交人ID
     */
    @TableField("creater_id")
    private String createrId;
    /**
     * 提交时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 总人数
     */
    @TableField("people_num")
    private Integer peopleNum;
    /**
     * 总时长
     */
    @TableField("total_time")
    private Double totalTime;
    /**
     * 请假原因
     */
    private String remark;

    /**
     * 申请类型
     */
    @TableField("apply_type")
    private Integer applyType;
    /**
     * 审批状态
     */
    @TableField("status")
    private Integer status;
    /**
     * 最后审批人
     */
    @TableField("examiner_id")
    private String examinerId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
